package com.xzy.spring.business.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author xzy
 * @date 2021-02-10 20:02
 * 说明：
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DogEntity {
    private String identity;
    private long createTime;
    private boolean isDelete;

    public DogEntity(String identity) {
        this.identity = identity;
        System.out.println("----> the bean（" + identity + "） has been constructed！");
    }

    @PostConstruct
    public void postConstruct() {
        System.out.println("----> the bean（" + identity + "） postConstruct()");
    }

    @PreDestroy
    public void preDestroy() {
        System.out.println("----> the bean（" + identity + "） preDestroy()");
    }
}
